import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:yp/config/config.dart';
import 'package:yp/pages/mall_app/account_safe_modify_phone_sure/state.dart';

import '../../../helper.dart';
import 'logic.dart';

class ModifyPhonseSurePage extends StatelessWidget {
  final logic = Get.put(ModifyPhoneSureLogic());
  final ModifyPhonseSureState state = Get.find<ModifyPhoneSureLogic>().state;
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        backgroundColor: Config.mainColor,
        title: Text(
          "更换手机号",
          style: TextStyle(
            color: Colors.white,
            fontSize: setWidth(34),
          ),
        ),
        centerTitle: true,
        elevation: 0,
      ),
      body: Padding(
          padding: EdgeInsets.symmetric(
              horizontal: setWidth(80), vertical: setWidth(40)),
          child: Column(
            crossAxisAlignment: CrossAxisAlignment.start,
            children: [
              SizedBox(
                height: setWidth(50),
              ),
              Text(
                '确定更换手机号为${state.phone}?',
                style:
                    TextStyle(color: Color(0xff222222), fontSize: setWidth(30)),
              ),
              Text(
                '${state.phone}登录可查看当前账号的资产',
                style:
                    TextStyle(color: Color(0xff888888), fontSize: setWidth(26)),
              ),
            ],
          )),
      bottomNavigationBar: Padding(
          padding: EdgeInsets.only(
              bottom: setWidth(300), left: setWidth(80), right: setWidth(80)),
          child: ClipRRect(
              borderRadius: BorderRadius.circular(setWidth(45)),
              child: Container(
                width: setWidth(660),
                height: setWidth(90),
                child: TextButton(
                    onPressed: () {
                      logic.sure();
                    },
                    style:
                        TextButton.styleFrom(backgroundColor: Config.mainColor),
                    child: Text(
                      '确定更换',
                      style: TextStyle(
                          color: Colors.white, fontSize: setWidth(28)),
                    )),
              ))),
    );
  }
}
